Change uppercase code sequences, which failes (???) on 32-bit systems.
authoroliskoli <oliskoli@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sat, 8 Apr 2006 12:20:38 +0000 (12:20 +0000)
committeroliskoli <oliskoli@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sat, 8 Apr 2006 12:20:38 +0000 (12:20 +0000)
gpsbabel/garmin_txt.c

index ed8ae5cbef8792e1875c8bb869e3c23e2e40ef74..1a8572e182edee56eccc032a838bdd2b17253468 100644 (file)
@@ -162,7 +162,9 @@ init_date_and_time_format(void)
        strncpy(buff, origin, sizeof(buff));
        
        src = lrtrim(buff);
-       for (c = src; *c; c++) *c = toupper(*c);
+       for (c = src; *c; c++) {
+               *c = toupper(*c);
+       }
        
        Y = 0;
        prev = '\0';
@@ -1053,8 +1055,9 @@ parse_header(void)
        
        while ((str = csv_lineparse(NULL, "\t", "", column++))) {
                header_lines[unknown_header][column] = xstrdup(str);
-               str = header_lines[unknown_header][column];
-               while (*str) *str++ = toupper(*str);
+               for (str = header_lines[unknown_header][column]; *str; str++) {
+                       *str = toupper(*str);
+               }
                header_ct[unknown_header]++;
                if (header_ct[unknown_header] >= MAX_HEADER_FIELDS) break;
        }
@@ -1093,8 +1096,9 @@ bind_fields(const header_type ht)
        fields = xmalloc(i + 2);
        strcpy(fields, headers[ht]);
        strcat(fields, "\t");
-       c = fields;
-       while (*c) *c++ = toupper(*c);
+       for (c = fields; *c; c++) {
+               *c = toupper(*c);
+       }
        c = fields;
        while ((c = strchr(c, '\t'))) *c++ = '\0';